<section class="gh-view">
    <header class="view-header">
        {{#gh-view-title classNames="gh-editor-title" openMobileMenu="openMobileMenu"}}
            {{gh-trim-focus-input type="text" id="entry-title" placeholder="Your Post Title" value=model.titleScratch tabindex="1" focus=shouldFocusTitle}}
        {{/gh-view-title}}
        <section class="view-actions">
            <button type="button" class="post-settings" title="Post Settings" {{action "openSettingsMenu"}}>
                <i class="icon-settings"></i>
            </button>
            {{gh-editor-save-button
                isPublished=model.isPublished
                willPublish=willPublish
                postOrPage=postOrPage
                isNew=model.isNew
                save="save"
                setSaveType="setSaveType"
                delete="toggleDeletePostModal"
                submitting=submitting
            }}
        </section>
    </header>

    {{gh-editor value=model.scratch
                shouldFocusEditor=shouldFocusEditor
                editorFocused=(action "autoSaveNew")
                onTeardown=(action "cancelTimers")}}
</section>

{{#if showDeletePostModal}}
    {{gh-fullscreen-modal "delete-post"
                          model=model
                          close=(action "toggleDeletePostModal")
                          modifier="action wide"}}
{{/if}}

{{#if showLeaveEditorModal}}
    {{gh-fullscreen-modal "leave-editor"
                          confirm=(action "leaveEditor")
                          close=(action "toggleLeaveEditorModal")
                          modifier="action wide"}}
{{/if}}

{{#if showReAuthenticateModal}}
    {{gh-fullscreen-modal "re-authenticate"
                          close=(action "toggleReAuthenticateModal")
                          modifier="action wide"}}
{{/if}}
